import {Component, OnInit} from '@angular/core'

@Component({
  selector: 'app-home',
  templateUrl: './home.component.html',
  styleUrls: ['./home.component.scss']
})
export class HomeComponent implements OnInit {

  public flag: boolean = true
  public status: number = 2
  public colorFlag: boolean = false
  public arrA: any[] = [123, 234, 345]
  public styleColor = 'blue'
  public time: any = new Date()
  public mydata: string = '默认值 '
  public modedata: string = '默认值'

  constructor() {
  }

  ngOnInit(): void {
  }

  run(e) {
    let dom: any = e.target
    dom.style.color = 'blue'
  }

  setData() {
    this.mydata = 'jacksldlfk'
  }

  keyDown() {
    console.log('keyDonw')
  }

  keyDown2(e) {
    // console.log(e)
    console.log(e.target.value)
  }
}
